/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package expression.interval;

/**
 *
 * @author ddoose
 */
public class IntUniverse extends Interval {
    
    IntUniverse() {
        super();
    }
    
    public boolean isEmpty() {
        return false;
    }
    
    public boolean isUniverse() {
        return true;
    }
    
    public boolean isValue() {
        return false;
    }

    public int getValue() {
        throw new UnsupportedOperationException("IntLeftBounded has no value");
    }

    public boolean isLeftBounded() {
        return false;
    }
    
    public int getLeftBound() {
        throw new UnsupportedOperationException("IntUniverse has no left bound");
    }
    
    public boolean isRightBounded() {
        return false;
    }
    
    public int getRightBound() {
        throw new UnsupportedOperationException("IntUniverse has no right bound");
    }

    public Interval inter(Interval i) {
        return i.clone();
    }
    
    public Interval union(Interval i) {
        return clone();
    }
    
    public boolean equals(Interval i) {
        return (i instanceof IntUniverse);
    }

    public Interval clone() {
        return new IntUniverse();
    }
    
    public String toString() {
        return "][";
    }
}
